import 'package:flutterapp900sui/models/listModelItems.dart';

class CommonPageModel{
  int total = 0;
  int page = 0;
  List listItems = List();

  void loadingItems(Map json,int page){

    if(page <= 1){
      this.listItems.clear();
    }

    this.page = page;
    var total = json['TotalNum'];
    List tmpList = json['Lists'];

    print('${json}');

    if(tmpList.isNotEmpty){
      tmpList.forEach((element) {
        var cellItem = ListCellItem('');
        cellItem.anyObject = element;
        this.listItems.add(cellItem);
      });
    }
    this.total =total;
  }
}